/*
 * @Description: 
 * @Author: chenjiaxin
 * @Date: 2021-12-21 21:58:22
 * @LastEditTime: 2021-12-21 21:58:22
 * @FilePath: \novel-serve\src\utils\password-handle.js
 */

const crypto = require('crypto');

const md5Password = (password) => {
  const md5 = crypto.createHash('md5');
  // digest() 默认返回的是buffer  digest('hex') 返回的是十六进制
  return md5.update(password).digest('hex');
}

const a = () => {
  console.log(12);
}

module.exports = md5Password;

